package br.perfiman.service.impl;

import javax.ejb.EJB;
import javax.ejb.Stateless;

import br.perfiman.dao.AbstractDAOService;
import br.perfiman.dao.BillDAOService;
import br.perfiman.model.Bill;
import br.perfiman.service.BillService;

/**
 *
 * @author Wagner Costa
 * @since 27/12/2007
 * @version 1.0
 *
 */
@Stateless
public class BillServiceBean extends AbstractServiceBean<Bill> implements BillService{
	@Override
	public Bill insert(Bill entity) throws Exception {
		entity.setStatus(Bill.STATUS_OPENED);
		return super.insert(entity);
	}

	@EJB(name="BillDAOService")
	protected BillDAOService dao;

	@Override
	public AbstractDAOService<Bill> getDao() {
		return dao;
	}

	@Override
	public void validateBussinessRules(Bill entity, boolean isUpdate) {
		// TODO Auto-generated method stub
		
	}

	@Override
	public void validateInvalidFields(Bill entity, boolean isUpdate) {
		// TODO Auto-generated method stub
		
	}

	@Override
	public void validateRequiredFields(Bill entity, boolean isUpdate) {
		// TODO Auto-generated method stub
		
	}

}
